|
DX11 GET BUFFER VECTOR2
Returns the vector2 stored at the specified position in the given buffer.
A vector2 is simply stored as two floats after each other and can be read / written as such if preferred. A vector2 corresponds to the float2 HLSL construct.
Take note that only primitive data types (booleans, integers, unsigned integers and floats) can be used as elements in an array buffer. Because of this, you cannot use this function with an array buffer.
The offsetInElement argument is only used by structured buffers; array- and byte address buffers will ignore it.
Return Dword = DX11 GET BUFFER VECTOR2(buffer, offset, [offsetInElement], [destinationVector])
buffer Dword The buffer to read the vector2 data from.
offset Dword The offset within the buffer to read the value from. If called for a structured buffer or an array buffer, this corresponds to the element id to get. For a byte address buffer it is the offset in bytes from the beginning of the buffer. Note that byte address buffers can only be read from at 4-byte aligned addresses by the GPU.
[Optional] offsetInElement Dword The offset within the current struct of the given element. Only relevant for structured buffers to allow writing struct entries with multiple data types. Ignored for all other buffer types. Set to zero (or whatever other value) if you want to store the return value to your own previously created vector2 instance.
[Optional] destinationVector Dword A previously created vector2 that will be filled out with the read data. Defaults to nullptr if omitted, in which case a temporary vector will be created and returned.
The vector2 stored at the given offset in the buffer. This will either be the same vector2 that was provided as the last argument, or a temporary vector2 valid until the next DX11 SYNC call if no destination vector was provided.
DIRECTCOMPUTE Functions Menu
DX11 Function Categories
|